package com.cloud.school.app.config;

import java.util.List;
import java.util.Set;
import java.util.concurrent.TimeUnit;

/**
 * @ClassName CacheService
 * @Description TODO
 * @Author 36297
 * @Date 2018/12/13 22:49
 * @Version 1.0
 */
public interface CacheService {
    void hashPut(String key, String field, String value);

    boolean hashIfAbsentPut(String key, String field, String value);

    String hashGet(String key, String field);

    boolean hashHasKey(String key, String field);

    Set<String> hashKeys(String key);

    List<String> hashValues(String key);

    void hashDelete(String key, String field);

    void hashIncr(String key, String field);

    void put(String key, String value);

    void put(String key, String value, long time, TimeUnit timeUnit);

    boolean putIfAbsent(String key, String value, long time, TimeUnit timeUnit);

    boolean expire(String key, long timeout, TimeUnit timeUnit);

    String get(String key);

    boolean hasKey(String key);

    boolean delete(String key);

    void setPut(String key, String value);

    void setRemove(String key, String value);

    boolean setContains(String key, String value);

    Set<String> setMembers(String key);
}
